﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Toolbox
{
    public partial class frmConfig : Form
    {
        public string Connection 
        {
            get
            {
                return textConnection.Text;
            }        
        }

        public frmConfig()
        {
            InitializeComponent();

            textConnection.Text = Properties.Settings.Default.UserToolboxConnectionString;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.UserToolboxConnectionString = textConnection.Text;
            Properties.Settings.Default.Save();
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();            
        }
    }
}
